CommandInsertTrafficLight Class Reference

#include <CommandInsertTrafficLight.h>

Inheritance diagram for CommandInsertTrafficLight:

Command List of all members.

Public Member Functions

 CommandInsertTrafficLight (osg::Vec3 pos, OSGWindows *osgwind, TrafficLightTypes newType, TrafficLightColor newColor, TrafficLightColor newArrowColor)
bool execute ()
bool unexecute ()

Private Attributes

OSGWindows * osgwind_
TrafficLight * light
vector< TraffEduObject * > insertedObjs_

Detailed Description

Definition at line 8 of file CommandInsertTrafficLight.h.


Constructor & Destructor Documentation

CommandInsertTrafficLight::CommandInsertTrafficLight (  osg::Vec3  pos,
OSGWindows *  osgwind,
TrafficLightTypes  newType,
TrafficLightColor  newColor,
TrafficLightColor  newArrowColor
) 
 

A constructor. Initializes osgwind_ and creates a new traffic light object by using the given parameters.

Parameters:
pos a osg::Vec3 variable.
osgwind an OSGWindows pointer.
newType a TrafficLightTypes argument.
newColor a TrafficLightColor argument.
newArrowColor a TrafficLightColor argument.

Definition at line 3 of file CommandInsertTrafficLight.cpp.

References OSGWindows::addObject(), TraffEduObject::getObjectGroup(), insertedObjs_, light, osgwind, osgwind_, TraffEduObject::setPosition(), and TraffEduObject::setScale().


Member Function Documentation

bool CommandInsertTrafficLight::execute (   )  [virtual]
 

do the insertion of traffic light object operation.

Returns:
Operation success

Implements Command.

Definition at line 19 of file CommandInsertTrafficLight.cpp.

References OSGWindows::doAddGeode(), light, and osgwind_.

bool CommandInsertTrafficLight::unexecute (   )  [virtual]
 

undo the insertion of traffic light object operation.

Returns:
Operation success

Implements Command.

Definition at line 27 of file CommandInsertTrafficLight.cpp.

References OSGWindows::doDeleteGeode(), light, and osgwind_.


Member Data Documentation

vector<TraffEduObject*> CommandInsertTrafficLight::insertedObjs_ [private]
 

a private vector of TraffEduObjects. It holds the inserted traffic light objects.

Definition at line 28 of file CommandInsertTrafficLight.h.

Referenced by CommandInsertTrafficLight().

TrafficLight* CommandInsertTrafficLight::light [private]
 

a private variable. It is used to hold the created traffic light object.

Definition at line 22 of file CommandInsertTrafficLight.h.

Referenced by CommandInsertTrafficLight(), execute(), and unexecute().

OSGWindows* CommandInsertTrafficLight::osgwind_ [private]
 

a private variable. It is initialized with the unique OSGWindows instance.

Definition at line 16 of file CommandInsertTrafficLight.h.

Referenced by CommandInsertTrafficLight(), execute(), and unexecute().


The documentation for this class was generated from the following files:
Generated on Sun May 28 18:54:12 2006 for TraffEdu by  doxygen 1.4.6-NO